<?php


namespace bee;
//error_reporting(E_ALL | E_STRICT);
ini_set("display_errors", 1);
function exception_error_handler($errno, $errstr, $errfile, $errline )
{
  throw new \ErrorException($errstr, 0, $errno, $errfile, $errline);
  return false;
}
function last_exception_handler(\Exception $e )
{ file_put_contents("../last_exception.log", print_r($e, true), FILE_APPEND | FILE_TEXT);
  echo "<br />:" . str_replace("   ", "&nbsp;", nl2br(print_r($e, true))) . ":";
  debug_print_backtrace();
  return false;
}

//set_error_handler("bee\exception_error_handler", E_ALL & !E_DEPRECATED | E_STRICT);
//set_exception_handler("bee\last_exception_handler");
session_save_path("../tmp");
session_start();
require_once "../conf/appConfig.php";

//require_once "lib/bee_autoLoader.php";
require_once "lib/core.php";

$proc = processor::getInstance();
//die("5");
$proc->serveUserApp();